package model;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Injured {
	private Integer id;
	private Integer acid;
	private Integer sex;
	private Integer age;
	private String name;
	private String phone;
	private String address;
	private Integer currentinfo;
	private Date injuredtime;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getAcid() {
		return acid;
	}

	public void setAcid(Integer acid) {
		this.acid = acid;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Integer getCurrentinfo() {
		return currentinfo;
	}

	public void setCurrentinfo(Integer currentinfo) {
		this.currentinfo = currentinfo;
	}

	public Date getInjuredtime() {
		return injuredtime;
	}

	public void setInjuredtime(String str) throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date injuredtime = null;
		if (str.equals(null) || str.equals("")) {
			injuredtime = null;
		} else {
			injuredtime = sdf.parse(str);
		}

		this.injuredtime = injuredtime;
	}

	@Override
	public String toString() {
		return "Injured [id=" + id + ", acid=" + acid + ", sex=" + sex
				+ ", age=" + age + ", name=" + name + ", phone=" + phone
				+ ", address=" + address + ", currentinfo=" + currentinfo
				+ ", injuredtime=" + injuredtime + "]";
	}

}
